package com.zsy.mapper;

import com.zsy.pojo.Emp;
import com.zsy.pojo.EmpQueryParam;
import com.zsy.pojo.LoginDto;
import com.zsy.pojo.LoginInfo;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

@Mapper
public interface EmpMapper {
    List<Emp> queryPageEmp(EmpQueryParam empQueryParam);

    Emp queryEmpById(String id);

    void addEmp(Emp emp);

    void delEmpByIds(List<Integer> ids);

    void updateEmp(Emp emp);

    List<Emp> queryEmpList();

    @MapKey("jobName")
    List<Map<String, Object>> getEmpJobData();

    @MapKey("name")
    List<Map> getEmpGenderData();

    @Select("select * from emp where username=#{username} and password=#{password}")
    LoginInfo findByUsernameAndPassword(LoginDto loginDto);
}
